package com.njuse.seecjvm.instructions.control;

import com.njuse.seecjvm.instructions.base.NoOperandsInstruction;
import com.njuse.seecjvm.runtime.JThread;
import com.njuse.seecjvm.runtime.StackFrame;

public class IRETURN extends NoOperandsInstruction {

    /**
     * TODO： 实现这条指令
     */
    @Override
    public void execute(StackFrame frame) {
        JThread thread = frame.getThread();
        int temp=frame.getOperandStack().popInt();
        thread.popFrame();
        StackFrame newframe=thread.getTopFrame();
        newframe.getOperandStack().pushInt(temp);
        
        
    }
}
